Primary exercises
Apply the following to survey data:
Select personal information {name, age, gender, height} into a new tibble
survey_personal_info.Select personal information as previous exercise into a new tibble
survey_personal_infobut with variable names initials in uppercase, e.g.Name,Ageetc.Reorder the variables in survey dataset as such that name,age and gender appear as first, second and the third column followed by the remaining variables.
Deselect variables that relate to hand and/or arm (e.g. span1, span2, hand, etc.). See also description survey data.
Select the top 20 names along with gender.
Reproduce the following tibbles (note that variables are renamed and reshuffled):
6.1 First 5 observations.
# A tibble: 5 × 13 SPAN1 SPAN2 name gender hand fold pulse clap exerc…¹ smokes height m.i age <dbl> <dbl> <chr> <chr> <chr> <chr> <dbl> <chr> <chr> <chr> <dbl> <chr> <dbl> 1 18.5 18 Alyson female right right 92 left some never 173 metr… 18.2 2 19.5 20.5 Todd male left right 104 left none regul 178. impe… 17.6 3 18 13.3 Gerald male right left 87 neit… none occas NA <NA> 16.9 4 18.8 18.9 Robert male right right NA neit… none never 160 metr… 20.3 5 20 20 Dustin male right neit… 35 right some never 165 metr… 23.7 # … with abbreviated variable name ¹exercise6.1 Last 3 observations.
# A tibble: 3 × 13 Hand Fold Clap name gender span1 span2 pulse exerc…¹ smokes height m.i age <chr> <chr> <chr> <chr> <chr> <dbl> <dbl> <dbl> <chr> <chr> <dbl> <chr> <dbl> 1 right right right Tracey female 17.5 16.5 NA some never 170 metr… 18.6 2 right right right Keith male 21 21.5 90 some never 183 metr… 17.2 3 right right right Celina female 17.6 17.3 85 freq never 168. metr… 17.8 # … with abbreviated variable name ¹exercise